<html>
<head>
<title>.: :.</title>
</head>
<body>
	<?php echo form_open('crud/tambah'); ?>
	<pre>
		<h1>Tambah Data Mahasiswa</h1>
		Nim : <input type="text" name="nim" placeholder="nimmo" required autofocus><br>
		Nama : <input type="text" name="nama" placeholder="nama" required><br>
		Jurusan : <input type="text" name="jurusan" placeholder="jurusan" required><br>
		Alamat : <input type="text" name="alamat" placeholder="alamat" required><br>
		<input type="submit" value="Simpan">
	</pre>
	<?php form_close(); ?>

<table border="1">
<tr>
	<td>Nim</td>
	<td>Nama</td>
	<td>Jurusan</td>
	<td>Alamat</td>
	<td colspan="2">Aksi</td>
</tr>
	<?php foreach ($data as $row) { ?>
	<tr>
	
		<td><?php echo $row->nim; ?> </td>
		<td><?php echo $row->nama; ?> </td>
		<td><?php echo $row->jurusan; ?> </td>
		<td><?php echo $row->alamat; ?> </td>
		<td><a href= '<?php base_url(); ?>crud/edit/<?php echo $row->nim; ?>'>Edit</a></td>
		<td><a href= '<?php base_url(); ?>crud/hapus/<?php echo $row->nim; ?>'>Hapus</a></td>
	</tr>
	<?php } ?>
</table>
</body>
</html>